/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dvdfe8.crochet.modelo.service;

import com.dvdfe8.crochet.modelo.dao.AmigurumiDao;
import com.dvdfe8.crochet.modelo.entity.Amigurumi;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author David
 */
@Service
public class AmigurumiServiceImpl implements AmigurumiService {

    @Autowired
    AmigurumiDao amigurumiDao;

    @Override
    public void crear(Amigurumi amigurumi) {
        amigurumiDao.crear(amigurumi);
    }

    @Override
    public List<Amigurumi> listarTodos() {
        return amigurumiDao.listarTodos();
    }

    @Override
    public void eliminar(Amigurumi amigurumi) {
        amigurumiDao.eliminar(amigurumi);
    }

    @Override
    public Amigurumi getAmigurumiById(int id) {
        return amigurumiDao.getAmigurumiById(id);
    }

    @Override
    public Amigurumi getAmigurumiByNombre(String nombre) {
        return amigurumiDao.getAmigurumiByNombre(nombre);
    }
}
